Release 10.1A: OpenEdge Development:
Translation Manager
Text segment expansion
This section describes the Translation Manager text segment expansion process.
Text segment growth is the process of expanding source code text segment allocation at compile time so that translations can fit in their text segments without truncation. Text segment growth is important when you translate a compact language, such as English, into other less compact languages. For example, the English word “file” is shorter than the French translation “fichier.”
The purpose of text segment expansion is to avoid truncation of text phrases. Text phrase truncation occurs when the Compiler allocates a given number of characters for a text phrase in the text segment but a translation of the text phrase exceeds that number. The translated text phrase is truncated in the text segment and appears truncated on the screen. To overcome this common difficulty, use text segment expansion to add a number of extra characters to each text phrase.
A drawback to the text expansion process is that additional characters might disturb the layout of the interface.
The best solution is for developers to create source code that specifies maximum-length options for character strings to provide adequate space for truncation. For more information on how to hard code the length of a text string, see the character-string literal section of OpenEdge Development: Progress 4GL Reference .
The Translation Manager applies text segment growth to a text phrase only if it has a translation and does not have a hard-coded string-length attribute. If a text string is marked untranslatable (:U), or if it is explicitly set to a maximum length (for example, “hello” R10), the Translation Manager does not apply the text-segment growth expansion factor to that individual text phrase. For more information on the
TRIMstring attribute, see Chapter 1, " Preparing Your Application for Translation."The Translation Manager uses the algorithm in Table 8–1 to set the growth factor. For short strings, the Translation Manager increases strings by 200%, meaning that the new strings are three times as long as the original strings (original + 200%).
The Compile dialog box lets you enter a value in the Growth Table field. This value specifies the percentage of the internal table’s growth factor that the Translation Manager uses to expand text strings.
Table 8–2 shows examples of how the Translation Manager determines the length of the target phrase.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |